import { App } from "vue";
import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";

const routes: RouteRecordRaw[] = [
  {
    path:"/login",
    name:"login",
    component:()=>import("../views/login/Login.vue")
  },
  {
    path:"/home",
    name:"home",
    component:()=>import("../views/home/Home.vue")
  }
];

const router = createRouter({
  history: createWebHashHistory(),
  routes // 路由配置
});

export const initRouter =(app: App<Element>)=>{
  app.use(router);
}

// export default router;